package cn.maxhou.controller;

import cn.max.anno.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

public class TestController {

    @RequestMapping("/test")
    public void test(HttpServletRequest req, HttpServletResponse resp) throws IOException {
        resp.setContentType("text/html;charset=utf-8");
        resp.setCharacterEncoding("utf-8");
        req.setCharacterEncoding("utf-8");
        System.out.println("你好test");
        PrintWriter out = resp.getWriter();
        out.println("测试");
    }
}